<!-- 首页 -->
<template>
	<view class="container">

		<view class="header-Container header-height">

			<image class="header-bg" :src="imgSite + icon.headerBg" mode="aspectFill"></image>
			<view class="content">
				<image class="logo" :src="imgSite + icon.logo" mode=""></image>
				<view class="search-input">
					<image :src="icon.search" mode="widthFix"></image>
					<input key="indexSearch" confirm-type="search" :placeholder="searchMsg || '输入关键词搜索'" placeholder-class="placeholder" @tap="bindKeyInput()" />
				</view>

				<!-- <image class="btn-icon" :src="icon.sign" mode="" @click="sign()"></image> -->

				<view @click="gotoMsgCenter()" class="msgCenter-Container">
					<image class="btn-icon" :src="icon.message" mode=""></image>
					<view v-if="noticeTipCount || $store.state.msgNumber" class="msgCount">
						{{noticeTipCount + $store.state.msgNumber > 99 ? '99+' : noticeTipCount + $store.state.msgNumber}}
					</view>
				</view>
			</view>
		</view>
		<!-- <load-refresh ref="loadRefresh" isRefresh refreshType="hollowDots" :pageNo="1" :totalPageNo="1" color="#FE5E49"
		 heightReduce="200" backgroundCover="#F3F5F5" @refresh="onRefresh"> -->
			
			<view class="column-start" style="width: 100%;">
				<view class="swiper-view" >
					<swiper class="swiper" autoplay @change="(e)=> swiperIndex = e.detail.current">
						<swiper-item v-for="(item, index) in bannerArr" :key="index">
							<image :src="imgSite + item.bannerAddress" :data-index="index" @click="resourceClick(item)" mode="aspectFill"
							 class="swiper-image"></image>
						</swiper-item>
					</swiper>
					<view class="row-div indicator-view">
						<view :class="{'indicator-item': true, 'active': swiperIndex == index}" v-for="(item, index) in bannerArr"></view>
					</view>
					<scroll-view scroll-x scroll-with-animation class="card-icon-view">
						<view class="row-between" style="white-space: nowrap;">
							<view class="column-div" v-for="item in iconsList" @click="resourceClick(item)">
								<image :src="imgSite+item.bannerAddress" style="width: 87upx;height: 87upx;"></image>
								<text>{{item.funcLabel}}</text>
							</view>
						</view>
					</scroll-view>
				</view>
				<view style="height: 153upx;"></view>
				<view class="row-between" style="width: 100%;padding: 0 30upx;align-items: flex-start;">
					<image src="../../static/assets/jingxuan.png" style="width: 135upx;height: 34upx;"></image>
					<image src="../../static/assets/logo-bg.png" style="width: 70upx;height: 56upx;"></image>
				</view>
				<view class="row-between" style="width: 100%;flex-wrap: wrap;padding: 0 30upx;" v-if="areaGoodsList && areaGoodsList.length">
					<HomeGoods style="width: calc(100% /2 - 11upx)" v-for="item in areaGoodsList" :item="item" :key="item.goodsCd"></HomeGoods>
				</view>
				<g-empty v-else />
				<!-- 占位 -->
				<view style="width:100%;height:50rpx;"></view>
			</view>
			
		<!-- </load-refresh> -->
		<!-- 新人优惠券 -->
		<view class="firstLoad" style="padding-top: 565rpx;" v-if="showTip">
			<image class="b-g" src="/static/images/index/first.png"></image>
			<image class="close" src="/static/images/index/close.png" @click="close"></image>

			<scroll-view scroll-y="true" class="couponScrollView-Container">
				<view class="coupon" v-for="item of notUse" :key="item.id">
					<image lazy-load="true" class="bg" :src="icon.youhuiquan"></image>
					<view class="detail">
						<view class="left">
							<view class="price" v-if="item.couponType === '10'">
								<text>￥</text>
								<text>{{ item.faceValue / 100}}</text>
							</view>
							<view class="price" v-if="item.couponType === '20'">
								<text style="font-size: 46rpx;">{{ item.faceValue / 10 }}</text>
								<text style="font-size: 22rpx;">折</text>
							</view>
							<view class="msg ellipsis2" v-if="item.enoughMoney != '0'">满{{ item.enoughMoney / 100 }}可用</view>
							<view class="msg ellipsis2" v-if="item.enoughMoney == '0'">无门槛优惠券</view>
						</view>
						<view class="right">
							<view class="top">
								<view class="name ellipsis2">
									<text class="quan" v-if="item.couponType === '10'">满减券</text>
									<text class="quan" v-if="item.couponType === '20'">折扣券</text>
									<text class="quan" v-if="item.couponType === '30'">免单券</text>
									<text class="quan" v-if="item.couponType === '40'">免运费券</text>
									<text class="quan" v-if="item.couponType === '50'">满减运费券</text>
									<text class="text">{{ item.couponName }}</text>
								</view>
								<view class="time">
									<view class="canUse">{{ item.beginTime }}-{{ item.endTime }}</view>
								</view>
							</view>
						</view>
					</view>
				</view>
			</scroll-view>
			<button class="draw-btn" @tap="getCoupon()">立即领取</button>
		</view>


		<!-- 版本更新   -->
		<!-- #ifdef APP-PLUS -->
		<view class="newVersion" v-if="showUpdate">
			<image lazy-load="true" class="b-g" src="/static/images/index/version.png"></image>
			<view class="msg">发现新版本</view>
			<view class="num">v{{updateData.versionCode}}</view>
			<scroll-view scroll-y="true">
				<view><text>{{updateData.versionContent}}</text></view>
			</scroll-view>
			<view class="progress" v-if="updating">
				<cmd-progress :percent="progress" stroke-color="#FE5E49"></cmd-progress>
			</view>
			<view class="column-div" style="width: 100%;">
				<button class="version-btn" v-if="!updating" @tap="toUpversion">立即升级</button>
			</view>
		</view>
		<!-- #endif -->


		<!-- 用户协议，隐私政策     -->
		<!-- #ifdef APP-PLUS -->
		<view class="userAgreement" v-if="userAgreement">
			<view class="tips" v-if="!unagree">
				<view class="title">用户协议和隐私政策</view>
				<view class="msg">
					感谢您信任并使用构购。我们依据最新的法律要求，更新了构购《用户协议》和《隐私政策》，特意向您推送本提示，请您仔细阅读并充分理解相关条款。您点击“同意”即表示，您已阅读并同意更新后的协议和政策条款，构购将尽全力保障您的合法权益并为您提供更优质的产品和服务。
				</view>
				<view class="check" @click="toRichtext('1')">
					<view class="left">《用户协议》</view>
					<view class="right">
						查看
						<image lazy-load="true" src="/static/images/common/rightBtn.png"></image>
					</view>
				</view>
				<view class="check" @click="toRichtext('2')">
					<view class="left">《隐私政策》</view>
					<view class="right">
						查看
						<image lazy-load="true" src="/static/images/common/rightBtn.png"></image>
					</view>
				</view>
				<view class="btns">
					<view class="unagree borderOneRpx" @click="unAgree()">不同意</view>
					<view class="agree" @click="beAgree()">同意</view>
				</view>
			</view>
			<view class="nopass" v-if="unagree">
				<view class="msg">十分抱歉，若您不同意平台的《用户协议》和《隐私政策》，我们将无法为您提供服务。</view>
				<view class="btns">
					<view class="unagree borderOneRpx" @click="quitApp()">继续退出</view>
					<view class="agree" @click="toContinue()">暂不退出</view>
				</view>
			</view>
		</view>
		<!-- #endif -->

		
	</view>
</template>

<script>
	import {
		mapState,
		mapMutations
	} from 'vuex';

	import uniCountdown from '@/components/uni-countdown/uni-countdown';
	import goodList from '@/components/goodList/goodList';
	import HomeGoods from '@/components/home-goods/home-goods';
	export default {
		components: {
			uniCountdown,
			goodList,
			HomeGoods
		},
		data() {
			return {
				triggered: false,
				_triggered: false,
				swiperIndex: 0,
				iconsList: [],
				bannerArr: [],
				icon: {
					logo: '',
					headerBg: '',
					indexBg: '',
					search: '/static/images/index/search.png',
					sign: '/static/images/index/sign.png',
					message: '/static/images/index/message.png',
					moreBtn: '/static/images/index/moreBtn.png',
					secondsTitle: '/static/images/index/secondsTitle.png',
					youhuiquan: '/static/images/coupon/youhuiquan.png',
					youhui_zk: '/static/images/coupon/youhui_zk.png'
				},

				// 消息数量
				noticeTipCount: 0,

				// 优惠券
				notUse: [],

				// 搜索
				search: '',

				// 轮播图
				banner: {
					indicatorDots: true,
					autoplay: true,
					interval: 3000,
					duration: 500,
					circular: true,
					imgUrls: [],
					indicatorActiveColor: '#FFFFFF',
					indicatorColor: 'rgba(255,255,255,.5)'
				},

				// 主页功能
				areaId: null,
				pageNum: 1,
				pageN: 0,
				pageL: 0,
				nArray: 0,
				menuSwiperIndex: 0,
				indexMenuArray: [],
				indexMenuList: [],
				indicatorDots: true,
				noPageOneRow: false,
				currentPageOneRow: false,


				// 广告位置：1
				adPosition1: [],

				// 广告位置: 2
				adPosition2: [],

				// 秒杀&精选控制
				showSecondsBestFlag: false,
				// 秒杀商品
				countDownHour: 0,
				countDownMinute: 0,
				countDownSeconds: 0,
				secondsGoodsList: [],

				// 精选好货
				bestGoodsArea: {},
				bestGoodsList: [],

				// 活动广告
				activeAdSpace: [],

				// 专区商品
				areaNamesList: [],
				areaGoodsList: [],

				// 分类商品
				categoryId: "",
				categoryNamesList: [],
				categoryGoodsList: [],

				// 弹窗开关
				showTip: false,
				showUpdate: false,
				userAgreement: false,
				unagree: false,
				progress: 0, //更新进度条
				showMsg: false,
				updating: false,
				clickUpdate: false,

				updateData: {
					versionUrl: '',
					versionContent: '',
					versionCode: '',
					versionUrlIos: ''
				},

				versionCode: '',
				searchMsg: ''
			};
		},
		computed: {
			...mapState(['imgSite', 'hasLogin'])
		},
		onLoad() {

			// 首页数据
			let that = this;
			this.getIndexData();
			uni.getStorage({
				key: 'userAgreement',
				success(res) {
					that.userAgreement = false;
				},
				fail(res) {
					that.userAgreement = true;
				}
			});


			//获取版本信息
			// #ifdef APP-PLUS
			var vUrlFlag = 10; //10:安卓 20:ios
			if (plus.os.name.toLowerCase() === 'android') {
				vUrlFlag = 10;
				that.versionCode = "2.0.0";
			} else {
				vUrlFlag = 20;
				that.versionCode = "2.0.0";
			}
			that.$api.globalUtil.requestAjax({
				url: '/versionApi/getVersionApi',
				method: 'POST',
				data: {
					vUrlFlag: vUrlFlag
				},
				success: function(res) {
					var data = res.data.response;
					// if (data.versionCode != that.versionCode) {
					if (versionCompare(that.versionCode, data.versionCode)) {
						uni.hideTabBar();
						that.updateData.versionUrl = data.versionUrl;
						that.updateData.versionContent = data.versionContent;
						that.updateData.versionCode = data.versionCode;
						that.updateData.versionUrlIos = data.versionUrlIos;
						that.showUpdate = true;
					}


					function versionCompare(v1, v2) {
						if (typeof v1 === "number") {
							v1 = "0" + v1;
							v1 = v1.substr(1, v1.length - 1);
						}
						if (typeof v2 === "number") {
							v2 = "0" + v2;
							v2 = v2.substr(1, v2.length - 1);
						}

						if (v1 === v2) {
							// 版本一样高
							return false;
						}
						var v1Arry = v1.split("."),
							v2Arry = v2.split(".");

						for (var i = 0; i < v1Arry.length; i++) {
							if (i > v2Arry.length) {
								// 当前版本高
								return fasle;
							} else {

								if (parseInt(v1Arry[i]) > parseInt(v2Arry[i])) {
									// 当前版本高
									return false;
								} else if (parseInt(v1Arry[i]) < parseInt(v2Arry[i])) {
									// 接口版本高
									return true;
								}
							}
						}

						return true;
					}
				}
			});
			// #endif
			that.$api.globalUtil.requestAjax({
				url: '/HotSearchApi/getDefaultHotSearch',
				method: 'POST',
				success: function(res) {
					if (!res.data.response) return;
					that.searchMsg = res.data.response.defaultWord || '';
				}
			});
		},
		onShow() {
			uni.hideLoading();
			this.newUserCoupon();
			this.getMsgCount();
			this.$api.globalUtil.setTabBarBadge();
		},
		onPullDownRefresh() {
			this.areaGoodsList = []
			this.pageNum = 1;
			this.getIndexData();
		},
		onReachBottom() {
			if (!this.areaGoodsList.length) return;
			this.pageNum += 1;
			this.getAreaGoodsList_fun();
		},
		methods: {
			onRefresh () {
				this.areaGoodsList = []
				this.pageNum = 1;
				this.getIndexData();
			},
			// 获取轮播图
			getBannerList() {
				return this.$api.globalUtil.requestAjax({
					url: '/bannerApi/findBannerByTypeApi',
					method: 'POST',
					data: {
						bannerLocate: '10',
						terminal: 50,
						type: 10
					},
					success: (res) => this.bannerArr = res.data.response
				});
			},
			getIconList() {
				return this.$api.globalUtil.requestAjax({
					url: '/BannerApi/findBannerListForHomeApi',
					method: 'POST',
					data: {
						terminal: 50,
						locate: 10
					},
					success: (res) => {
						this.iconsList = res.data.response['20']
						this.icon.logo = res.data.response['logo'];
						this.icon.headerBg = res.data.response['bgImg'];
						this.icon.indexBg = res.data.response['bgImgTow'];
					}
				});
			},
			// 签到
			sign() {
				let that = this;
				that.$api.globalUtil.methodFilter({
					that: that,
					success: function() {
						that.$api.globalUtil.requestAjax({
							url: '/CustomerApi/signInGivePoints',
							method: 'POST',
							success: function(res) {
								uni.navigateTo({
									url: '/pagesAccount/signIn/sign?point=' + res.data.response.givingPoint
								});
							}
						});
					}
				});
			},


			// 消息数量
			getMsgCount() {

				var that = this;
				console.log("this.hasLogin", this.hasLogin)
				if (this.hasLogin) {
					let that = this;
					this.$api.globalUtil.requestAjax({
						url: '/customerNoticeApi/customerNoticeUnreadCountApi',
						method: 'POST',
						data: {
							cnType: "",
							cnStatus: '0'
						},
						success: function(res) {
							console.log("getMsgCount", res)
							that.noticeTipCount = res.data.response;
						}
					});
				}
			},

			// goto消息中心
			gotoMsgCenter() {
				let that = this;
				that.$api.globalUtil.methodFilter({
					that: that,
					success: function() {
						uni.navigateTo({
							url: '/pagesUser/msgCenter'
						});
					}
				});
			},


			// 新人优惠券领取
			newUserCoupon() {
				let that = this;
				uni.getStorage({
					key: 'tokenInfo',
					success() {
						that.$api.globalUtil.requestAjax({
							url: '/coupon/getNewCouponList',
							method: 'POST',
							success: function(res) {
								if (res.data.response.length > 0) {
									that.showTip = true;
									for (let i of res.data.response) {
										i.beginTime = that.timestampToTime(i.beginTime);
										i.endTime = that.timestampToTime(i.endTime);
										i.beginTime = i.beginTime.split(' ')[0];
										i.endTime = i.endTime.split(' ')[0];
									}
									that.notUse = res.data.response;
								}
							}
						});
					},
					fail(res) {}
				});
			},
			// 时间戳转换日期--补0--毫秒
			timestampToTime(timestamp) {
				var date = new Date(timestamp); //时间戳为10位需*1000，时间戳为13位的话不需乘1000
				var Y = date.getFullYear() + '-';
				var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
				var D = date.getDate() < 10 ? '0' + date.getDate() + ' ' : date.getDate() + ' ';
				var h = date.getHours() < 10 ? '0' + date.getHours() + ':' : date.getHours() + ':';
				var m = date.getMinutes() < 10 ? '0' + date.getMinutes() + ':' : date.getMinutes() + ':';
				var s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
				return Y + M + D + h + m + s;
			},


			/**
			 * 首页数据
			 */
			async getIndexData() {
				let that = this;

				// //首页数据
				// that.$api.globalUtil.requestAjax({
				// 	url: '/BannerApi/findBannerListForHomeApi',
				// 	method: 'POST',
				// 	data: {
				// 		terminal: '50',
				// 		locate: '10'
				// 	},
				// 	success: function(res) {
				// 		if (res.data.success) {

				// 			//LOGO
				// 			that.icon.logo = res.data.response['logo'];
				// 			that.icon.headerBg = res.data.response['bgImg'];
				// 			that.icon.indexBg = res.data.response['bgImgTow'];

				// 			//banner数据
				// 			that.banner.imgUrls = res.data.response['10'] || [];

				// 			//主页功能区
				// 			that.indexMenuArea(res.data.response['20']);

				// 			//广告位置1&2
				// 			that.adPosition1 = res.data.response['30'] || [];
				// 			that.adPosition2 = res.data.response['40'] || [];

				// 			//活动广告
				// 			that.activeAdSpace = res.data.response['50'] || [];
				// 		} else {
				// 			that.$api.msg(res.data.msg || '获取失败');
				// 		}
				// 	}
				// });


				// //秒杀&精选控制
				// that.$api.globalUtil.requestAjax({
				// 	url: '/versionApi/getSysSet',
				// 	method: 'POST',
				// 	data: {
				// 		category: 'SHOW_ACTIVITY_SWITCH'
				// 	},
				// 	success: function(res) {
				// 		if (res.data.success) {
				// 			if (res.data.response.length && res.data.response[0].setValue == 1) {
				// 				that.showSecondsBestFlag = true;
				// 			} else {
				// 				that.showSecondsBestFlag = false;
				// 			}
				// 		}
				// 	},
				// });

				// //限时秒杀
				// that.secondsGoodsList_fun();
				// //精选好货
				// that.bestGoodsList_fun();
				this.$api.showLoading()
				await this.getBannerList()
				await this.getIconList()
				// //专区商品
				await this.getAreaNamesList_fun();
				uni.stopPullDownRefresh();
				this.triggered = false;
				this._triggered = false;
				// setTimeout(() => this.$refs.loadRefresh.completed(), 500)
				//分类商品
				// that.getCategoryNamesList_fun();
			},


			/**
			 * 专区商品
			 */
			getAreaNamesList_fun() {
				return this.$api.globalUtil.requestAjax({
					url: '/areaApi/findAreaByTypeApi',
					method: 'POST',
					data: {
						areaType: 3 //专区类型 null：全部 1：普通活动(App首页) 2：普通活动(App首页底部) 3：精选 
					},
					success: async (res) => {
						if (!res.data.success) return this.$api.msg(res.data.msg || '获取失败');
						this.areaNamesList = res.data.response;
						if (this.areaNamesList) {
							for (var i = 0; i < this.areaNamesList.length; i++) {
								this.areaId = this.areaNamesList[i].areaId
								await this.getAreaGoodsList_fun();
							}
						}
					}
				});
			},
			getAreaGoodsList_fun(areaId, areaNameData) {
				this.$api.showLoading()
				return this.$api.globalUtil.requestAjax({
					url: '/areaGoodsApi/findAreaGoodsByAreaIdApi',
					method: 'POST',
					data: {
						areaId: this.areaId,
						pageNum: this.pageNum,
						pageSize: 10
					},
					success: (res) => {
						if (!res.data.success) return this.$api.msg(res.data.msg || '获取失败');
						let goodsList = res.data.response.results || [];
						if (!goodsList.length && this.pageNum != 1) return this.$api.msg('没有更多了...');
						goodsList.forEach(item => {
							let priceArr = (item.salesPrice / 100).toFixed(2).split('.');
							item.salesPrice = priceArr[0]
							item.zero = priceArr[1] ? '.' + priceArr[1] : ''
							item.marketPrice = (item.marketPrice / 100).toFixed(2)
							item.goodsLabelArr = item.goodsLabel ? item.goodsLabel.split(',') : []
						})
						this.areaGoodsList = this.areaGoodsList.concat(goodsList)
					},
					complate: () => this.$api.hideLoading()
				});
			},


			/**
			 * 分类商品
			 */
			getCategoryNamesList_fun() {
				this.$api.showLoading()
				var that = this;
				that.$api.globalUtil.requestAjax({
					url: '/areaApi/findAreaByTypeApi',
					method: 'POST',
					data: {
						areaType: 3 //专区类型 null：全部 1：普通活动(App首页) 2：普通活动(App首页底部) 3：精选 
					},
					success: function(res) {
						if (res.data.success) {
							that.categoryNamesList = res.data.response;
							if (that.categoryNamesList) {
								that.getCategoryGoodsList_fun(that.categoryNamesList[0].areaId);
							}
						} else {
							that.$api.msg(res.data.msg || '获取失败');
						}
					}
				});
			},
			getCategoryGoodsList_fun(categoryId) {
				this.$api.showLoading()
				this.categoryId = categoryId;
				this.$api.globalUtil.requestAjax({
					url: '/areaGoodsApi/findAreaGoodsByAreaIdApi',
					method: 'POST',
					data: {
						areaId: categoryId,
						pageNum: 1,
						pageSize: 10
					},
					success: (res) => {
						if (!res.data.success) return this.$api.msg(res.data.msg || '获取失败');
						let arr = res.data.response.results || [];
						if (arr.length == 0 && this.pageNum != 1) return this.$api.msg('没有更多了...');
						this.categoryGoodsList = this.categoryGoodsList.concat(arr)
					}
				});
			},


			/**
			 * 搜索商品
			 */
			bindKeyInput: function(e) {
				var that = this;
				uni.setStorage({
					key: 'type',
					data: 'searching',
					success: function() {
						uni.navigateTo({
							url: '/pagesGoods/product/list?msg=' + that.searchMsg
						});
					}
				});
			},


			/**
			 * 主页功能
			 */
			indexMenuArea(menuList) {

				let that = this;
				that.indexMenuList = menuList || [];

				let n = 0;
				let resLength = that.indexMenuList.length;
				if (resLength < 10) {
					n = 5;

					if (resLength <= 5) {
						this.indicatorDots = false;
						this.noPageOneRow = true;
					} else {
						this.indicatorDots = false;
						this.noPageOneRow = true;
					}

					this.currentPageOneRow = true;
				} else {
					n = 10;
					this.currentPageOneRow = false;
				}
				this.pageN = n;


				let arrLength = resLength % n == 0 ? resLength / n : parseInt(resLength / n) + 1;
				this.pageL = arrLength;

				let indexMenuArray = [];
				for (var i = 0; i < arrLength; i++) {
					indexMenuArray.push(i);
				}
				that.indexMenuArray = indexMenuArray;

				let nArray = [];
				for (var i = 0; i < n; i++) {
					nArray.push(i);
				}
				that.nArray = nArray;
			},


			//banner分页
			menuBannerSwiperChange(e) {
				this.menuSwiperIndex = e.detail.current;

				//控制功能区高度
				if (this.pageN == 10) {

					if (this.pageL == (this.menuSwiperIndex + 1)) {
						if (this.indexMenuList.length % 10 <= 5) {
							this.currentPageOneRow = true;
						} else {
							this.currentPageOneRow = false;
						}
					} else {
						this.currentPageOneRow = false;
					}
				}
			},
			menuBannerSwiperTransition(dx, dy) {

			},


			//专区详情
			gotoAreaDetai(areaId, areaName) {
				uni.navigateTo({
					url: '/pagesGoods/specialArea/activityArea?areaId=' + areaId + '&areaName=' + areaName
				});
			},


			//点击跳转
			indexMenuResourceClick(index) {
				this.resourceClick(this.indexMenuList[index]);
			},
			resourceClick(item) {
				this.$api.globalUtil.adJumpToOtherPage(item);
			},
			// 关闭首次优惠券弹窗
			close() {
				this.showTip = false;
			},
			// 版本更新
			toUpversion() {
				let platform = '';
				let that = this;
				uni.getSystemInfo({
					success(res) {
						platform = res.platform;
					}
				})
				if (platform == 'ios') {
					plus.runtime.openURL(that.updateData.versionUrlIos);
				} else {
					if (this.clickUpdate) return;
					this.clickUpdate = true;
					this.updating = true;
					var downloadTask = uni.downloadFile({
						url: this.updateData.versionUrl,
						success: downloadResult => {
							console.log(downloadResult);
							if (downloadResult.statusCode === 200) {
								plus.runtime.install(
									downloadResult.tempFilePath, {
										force: false
									},
									function() {
										plus.runtime.restart();
									},
									e => {
										console.log(e);
										this.success = false;
										uni.showToast({
											title: '安装升级包失败',
											icon: 'none'
										});
									}
								);
							}
						},
						fail: res => {
							console.log('更新失败', res);
						}
					});
					downloadTask.onProgressUpdate(e => {
						this.progress = e.progress;
						// console.log(e.progress)
					});

				}
				// this.showUpdate = false;
			},
			// 领取优惠券
			getCoupon() {
				let that = this;
				for (let i of that.notUse) {
					that.$api.globalUtil.requestAjax({
						url: '/coupon/addCustomerCoupon',
						method: 'POST',
						data: {
							couponId: i.couponId
						},
						success: function(res) {
							that.$api.msg("领取成功");
							that.showTip = false;

							setTimeout(function() {
								uni.navigateTo({
									url: '/pagesAccount/coupon/coupon'
								});
							}, 1500);
						}
					});
				}
			},
			unAgree() {
				this.unagree = true;
			},
			toContinue() {
				this.unagree = false;
			},
			beAgree() {
				uni.setStorage({
						key: 'userAgreement',
						data: true
					}),
					(this.userAgreement = false);
			},
			toRichtext(type) {
				uni.navigateTo({
					url: '/pagesUser/userRichtext?type=' + type
				});
			},


			//退出App
			quitApp() {
				if (plus.os.name.toLowerCase() === 'android') {
					plus.runtime.quit();
				} else {
					// const threadClass = plus.ios.importClass("NSThread");
					// const mainThread = plus.ios.invoke(threadClass, "mainThread");
					// plus.ios.invoke(mainThread, "exit");

					// const exitIosAPP = uni.requireNativePlugin('CGF-ExitIosApp');       
					// exitIosAPP.exitIosApp();

					plus.ios.import("UIApplication").sharedApplication().performSelector("exit");
				}
			},


			// 限时秒杀
			secondsGoodsList_fun() {

				var that = this;
				that.$api.globalUtil.requestAjax({
					url: '/ActivityApi/activityTimeListApi',
					method: "POST",
					data: {
						activityType: 2, //秒杀活动
						activityFlag: 20 //活动进行中
					},
					success: function(res) {
						if (res.data.success) {

							if (res.data.response && res.data.response.length) {

								var countDown = that.$api.globalUtil.startTimeFormate(res.data.response[0].endDt, res.data.response[0].currentDateTime);
								that.countDownHour = countDown['hour'];
								that.countDownMinute = countDown['minute'];
								that.countDownSeconds = countDown['seconds'];


								that.$api.globalUtil.requestAjax({
									url: '/ActivityApi/activityGoodsListApi',
									method: "POST",
									data: {
										activityId: res.data.response[0].activityId,
										activityType: 2, //秒杀活动
										activityFlag: 20, //活动进行中
										pageNum: 1,
										pageSize: 10
									},
									success: function(res) {
										if (res.data.success) {
											that.secondsGoodsList = res.data.response.results || [];
										}
									},
								});
							}
						}
					}
				});
			},


			//秒杀专区
			gotoSeckillAreaPage() {
				uni.navigateTo({
					url: '/pagesGoods/specialArea/seckillArea'
				});
			},


			// 精选好货
			bestGoodsList_fun() {

				var that = this;
				that.$api.globalUtil.requestAjax({
					url: '/areaApi/findAreaByTypeApi',
					method: "POST",
					data: {
						areaType: 3 //精选好货
					},
					success: function(res) {
						if (res.data.success) {

							if (res.data.response) {

								that.bestGoodsArea = {
									areaId: res.data.response[0].areaId,
									areaName: res.data.response[0].areaName
								};

								that.$api.globalUtil.requestAjax({
									url: '/areaGoodsApi/findAreaGoodsByAreaIdApi',
									method: "POST",
									data: {
										areaId: res.data.response[0].areaId,
										pageNum: 1,
										pageSize: 10
									},
									success: function(res) {
										if (res.data.success) {
											that.bestGoodsList = res.data.response.results || [];
										}
									},
								});
							}
						}
					}
				});
			},


			//好货专区
			gotoBestGoodsPage() {
				var areaId = this.bestGoodsArea.areaId;
				var areaName = this.bestGoodsArea.areaName;
				uni.navigateTo({
					url: '/pagesGoods/specialArea/activityArea?areaId=' + areaId + '&areaName=' + areaName
				});
			}
		}
	};
</script>

<style scoped lang="scss">
	.refresh-scroll {
		width: 100%;
		/* #ifdef H5 */
		height: calc(100vh - 95upx);
		/* #endif */

		/* #ifdef APP-PLUS */
		height: calc(100vh - (var(--status-bar-height) + 95rpx));
		/* #endif */

		/* #ifdef MP-WEIXIN */
		height: calc(100vh - (var(--status-bar-height) + 180upx));
		/* #endif */
	}

	.top-message {
		width: 51upx;
		height: 51upx;
		position: relative;

		image {
			width: 100%;
			height: 100%;
		}

		.uni-badge-left-margin {
			position: absolute;
			top: -20upx;
			right: -17upx;
		}
	}

	.search-view {
		width: 411upx;
		height: 54upx;
		margin-left: 33upx;
		background: #FFFFFF;
		border: 1px solid #F56D0A;
		border-radius: 27upx;

		text {
			font-size: 26upx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #999999;
			margin-left: 15upx;
		}
	}



	.swiper-view {
		width: 100%;
		height: 390upx;
		position: relative;

		.swiper {
			width: 100%;
			height: 100%;

			.swiper-image {
				width: 100%;
				height: 100%;
			}
		}

		.indicator-view {
			width: 100%;
			position: absolute;
			bottom: 93upx;
			z-index: 1;

			.indicator-item {
				width: 10upx;
				height: 10upx;
				background: rgba(254, 94, 73, 0.5);
				border-radius: 50%;
				margin: 0 5upx;
			}

			.active {
				width: 36upx;
				height: 10upx;
				background: #FE5E49;
				border-radius: 5upx;
				margin: 0 5upx;
			}
		}

		.card-icon-view {
			width: calc(100% - 60upx);
			position: absolute;
			left: 30upx;
			top: 313upx;
			margin: auto;
			background: #FFFFFF;
			border-radius: 10upx;
			padding: 27upx 10upx;

			.column-div {
				margin: 0 36upx;
			}

			image {
				width: 87upx;
				height: 87upx;
				margin-bottom: 20upx;
			}

			text {
				font-size: 24upx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #333333;
			}

			.card-icon {
				width: 100%;
				height: 182upx;
				background: #FFFFFF;
				box-shadow: 0px 3upx 6upx 0px rgba(196, 196, 196, 0.1);
				border-radius: 10upx;
				padding: 27upx 50upx;
			}
		}
	}

	.header-Container {
		width: 100%;

		.header-bg {
			position: absolute;
			top: 0;
			width: 100%;
			height: 100%;
		}

		.content {
			display: flex;
			align-items: center;
			justify-content: space-between;
			position: absolute;
			bottom: 16rpx;
			padding: 0 40upx 0 32upx;
			width: 100%;

			.logo {
				width: 148upx;
				height: 54upx;
			}

			.search-input {
				position: relative;
				width: 354rpx;
				// height: 56rpx;
				border-radius: 28px;
				border: 1rpx solid rgba(245, 109, 10, 1);

				image {
					position: absolute;
					left: 30rpx;
					top: 16rpx;
					width: 26rpx;
					height: 26rpx;
				}

				input {
					box-sizing: border-box;
					padding-left: 74rpx;
					height: 56rpx;
					line-height: 28rpx;
					font-weight: 400;
					font-family: MicrosoftYaHei;
					font-size: 28rpx;
					border-radius: 28rpx;
					background-color: #ffffff;
				}

				.placeholder {
					font-weight: 400;
					font-family: MicrosoftYaHei;
					font-size: 28rpx;
					color: #999999;
				}
			}

			.btn-icon {
				display: block;
				width: 50upx;
				height: 50upx;
			}


			.msgCount {
				position: absolute;
				bottom: 36rpx;
				right: 30rpx;
				box-shadow: 0px 1rpx 4rpx 0px rgba(68, 68, 68, 0.2);
				min-width: 26rpx;
				width: auto;
				height: 26rpx;
				line-height: 26rpx;
				text-align: center;
				font-size: 20rpx;
				font-family: PingFang SC;
				font-weight: bold;
				color: #FE5E49;
				background: rgba(255, 255, 255, 1);
				box-shadow: 0px 1rpx 4rpx 0px rgba(68, 68, 68, 0.2);
				border-radius: 13rpx;
			}
		}
	}


	// header
	.bg-Container {
		position: relative;
		margin: 0;
		padding: 0;
		width: 100%;

		.bg {
			position: absolute;
			width: 100%;
		}


		/* 轮播图 */
		.banner {
			position: relative;
			height: 350rpx;
			background-color: #ffffff;
		}

		.banner swiper {
			height: 350rpx;
		}

		.banner .slide-image {
			width: 100%;
			height: 100%;
		}
	}

	/* 主页功能 */
	.indexMenu-Container {
		position: relative;
		height: 420rpx;

		&.noMenuPage {
			height: 360rpx;
		}

		&.noPageOneRow {
			height: 220rpx;
		}

		.bg {
			position: absolute;
			top: 0;
			left: 0;
			width: 100%;
			height: 100%;
		}

		swiper {
			position: absolute;
			top: 0;
			left: 0;
			width: 100%;
			height: 100%;

			swiper-item {
				display: flex;
				flex-wrap: wrap;
				// background-color: #fff;

				.menu-item {
					justify-content: flex-start;
					padding-top: 30rpx;
					width: 20%;

					image {
						width: 86rpx;
						height: 86rpx;
					}

					view {
						margin-top: 13rpx;
						height: 32rpx;
						line-height: 32rpx;
						font-weight: 400;
						font-family: MicrosoftYaHei;
						font-size: 22rpx;
						color: rgba(102, 102, 102, 1);
					}
				}
			}
		}

		.wx-swiper-dot {
			width: 14rpx;
			display: inline-flex;
			height: 6rpx;
			border-radius: 3rpx;
			vertical-align: sub;
		}

		.wx-swiper-dot-active {
			width: 22rpx;
			display: inline-flex;
			height: 6rpx;
			border-radius: 3rpx;
			vertical-align: sub;
		}

		.wx-swiper-dot-active::before {
			border-radius: 3rpx;
			content: '';
			background: #333333;
			flex-grow: 1;
		}


		//分页
		.pages-Container {
			display: flex;
			align-items: center;
			justify-content: center;
			position: absolute;
			bottom: 0;
			width: 100%;
			height: 58rpx;

			.one-page {
				margin-right: 10rpx;
				width: 20rpx;
				height: 6rpx;
				background: rgba(102, 102, 102, 1);
				border-radius: 6px;

				&.current {
					margin-right: 10rpx;
					width: 30rpx;
					height: 6rpx;
					background: rgba(0, 0, 0, 1);
					border-radius: 6px;
				}
			}
		}
	}

	// 广告位置
	.ad-position {
		width: 100%;

		image {
			display: block;
			margin: 0;
			padding: 0;
			width: 100%;
		}
	}

	// 限时秒杀&精品好货
	.secondsBest-Container {
		display: flex;
		justify-content: space-between;
		margin-top: 24upx;
		padding: 0 30upx;

		&>view {
			width: 340upx;
			height: 296upx;
			background: rgba(255, 255, 255, 1);
			border-radius: 10upx;

			.title-Container {
				display: flex;
				align-items: center;
				justify-content: space-between;
				padding: 0 30upx;
				height: 80upx;

				image {
					width: 123upx;
					height: 34upx;
				}

				.title {
					font-size: 34upx;
					font-family: PingFang SC;
					// font-weight:bold;
					color: rgba(51, 51, 51, 1);
				}

				.desc {
					position: relative;
					width: 132upx;
					height: 34upx;
					line-height: 34upx;
					text-align: center;
					font-size: 24upx;
					font-family: PingFang SC;
					font-weight: 500;
					color: rgba(54, 211, 163, 1);
				}

				.desc.borderOneRpx:after {
					border-color: rgba(54, 211, 163, 1);
					border-radius: 34rpx;
				}
			}

			.goodsList-Container {
				display: flex;
				justify-content: space-between;
				padding: 0 30upx;
				height: 216upx;

				.goods-Content {
					width: 130upx;
					height: 100%;

					.goods-cover {
						width: 130upx;
						height: 130upx;
					}

					.new-price {
						margin-top: 10rpx;
						height: 19rpx;
						text-align: center;
						font-size: 16rpx;
						font-family: PingFang SC;
						font-weight: bold;
						color: rgba(51, 51, 51, 1);

						.number {
							font-size: 24rpx;
						}
					}

					.old-price {
						margin-top: 10rpx;
						height: 14rpx;
						text-align: center;
						text-decoration: line-through;
						font-size: 14rpx;
						font-family: PingFang SC;
						font-weight: 500;
						text-decoration: line-through;
						color: rgba(153, 153, 153, 1);

						.number {
							font-size: 18rpx;
						}
					}
				}
			}
		}
	}


	// 活动广告
	.activeSpace-Container {
		display: flex;
		justify-content: space-between;
		margin-top: 10upx;
		padding: 0 30upx;

		.oneSpace {
			width: 224upx;
			height: 246upx;

			image {
				width: 100%;
				height: 100%;
			}
		}
	}

	// 专区商品
	.areaGoods-Container {
		margin: 0 auto;
		margin-top: 20rpx;
		width: 690rpx;
		// padding: 26rpx 30rpx 0 30rpx;
		border-radius: 0px 0px 10rpx 10rpx;
		// background-color: #ffffff;
		box-shadow: 0 2rpx 10rpx 0 rgba(103, 103, 103, 0.1);

		.area_poster {
			display: block;
			width: 100%;
			height: 180rpx;
		}

		.areaDetail-Container {
			width: 100%;
			height: 66rpx;
			line-height: 66rpx;
			background: rgba(255, 255, 255, 1);
			box-shadow: inset 0px 0.5rpx 0.5rpx 0rpx rgba(68, 68, 68, 0.1);
			border-radius: 0px 0px 10rpx 10rpx;

			text-align: center;
			font-size: 24rpx;
			font-family: PingFang SC;
			// font-weight:500;
			color: rgba(102, 102, 102, 1);

			.moreBtn {
				margin-left: 9rpx;
				width: 9rpx;
				height: 15rpx;
			}
		}

		.good_list {
			padding-top: 30rpx;
			background-color: #ffffff;
		}

		/deep/.list-pages {
			padding: 0 30rpx;

			.list-block {
				margin-top: 0;
				margin-bottom: 30rpx;
				padding-bottom: 20rpx;
				width: 300rpx;
				border-radius: 10rpx;
				box-shadow: 0 2rpx 10rpx 0 rgba(103, 103, 103, 0.1);

				.list-poster {
					width: 300rpx;
					height: 300rpx;
				}
			}
		}
	}

	// 分类商品
	.categoryGoods-Container {
		padding-top: 26rpx;
		width: 100%;
		background-color: #ffffff;

		.category-list {
			width: auto;
			height: 132rpx;
			overflow-x: scroll;
			white-space: nowrap;
			background-color: #ffffff;
			display: flex;
			border-radius: 10rpx 10rpx 0px 0px;

			.category-item {
				position: relative;
				padding: 0 32rpx;
				display: flex;
				justify-content: center;
				flex-wrap: wrap;
				margin-top: 30rpx;
				height: 62rpx;
				width: 200rpx;

				.title {
					height: 30rpx;
					line-height: 30rpx;
					text-align: center;
					width: 100%;
					font-size: 32rpx;
					font-family: PingFang SC;
					color: rgba(51, 51, 51, 1);
				}

				.desc {
					margin-top: 13rpx;
					height: 19rpx;
					text-align: center;
					font-size: 20rpx;
					font-family: PingFang SC;
					color: rgba(153, 153, 153, 1);
				}
			}

			.category-item.current {
				.title {
					color: #FE5E49;
				}

				.desc {
					padding: 0 10rpx 0 10rpx;
					height: 34rpx;
					line-height: 34rpx;
					text-align: center;
					font-size: 20rpx;
					font-family: PingFang SC;
					font-weight: 500;
					color: rgba(255, 255, 255, 1);
					background: #FE5E49;
					border-radius: 17rpx;
					min-width: 100rpx;
				}
			}

			.borderOneRpx:after {
				border-left: 0;
				border-top: 0;
				border-bottom: 0;
				border-right-color: #cccccc;
			}
		}

		/deep/.list-pages {
			padding: 0 30rpx;

			.list-block {
				margin-bottom: 30rpx;
				width: 336rpx;
				box-shadow: 0 2rpx 10rpx 0 rgba(103, 103, 103, 0.1);
				border-radius: 10rpx;

				.list-poster {
					width: 336rpx;
					height: 336rpx;
				}
			}
		}
	}

	.firstLoad {
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		z-index: 999;
		background-color: rgba(0, 0, 0, 0.5);

		.b-g {
			position: absolute;
			top: 216rpx;
			left: 18rpx;
			width: 662rpx;
			height: 851rpx;
		}

		.close {
			position: absolute;
			top: 266rpx;
			right: 74rpx;
			width: 48rpx;
			height: 48rpx;
		}
	}


	// 优惠券滚动
	.couponScrollView-Container {
		height: 360rpx;
	}

	// 单个优惠券
	.coupon {
		margin-top: 26rpx;
		margin-left: 107rpx;
		position: relative;
		width: 701rpx;
		z-index: 2;

		.bg {
			height: 148rpx;
			width: 537rpx;
			position: absolute;
			z-index: 1;
			top: 0;
		}

		.detail {
			position: relative;
			z-index: 2;
			height: 148rpx;
			width: 537rpx;
			display: flex;

			.left {
				text-align: center;
				padding-top: 37rpx;
				margin-left: 4rpx;
				width: 150rpx;
				height: 148rpx;

				.price text:first-child {
					color: #FE5E49;
					font-size: 30rpx;
					font-weight: bold;
				}

				.price text:last-child {
					color: #FE5E49;
					font-size: 46rpx;
					font-weight: bold;
				}

				.msg {
					font-size: 20rpx;
					color: #FE5E49;
					margin-top: -6rpx;
					white-space: nowrap;
				}
			}

			.right {
				width: 381rpx;
				height: 190rpx;
				padding-top: 12rpx;

				.top {
					padding: 0 29rpx 16rpx 30rpx;
					line-height: 40rpx;

					.name {
						height: 88rpx;
					}

					.text {
						font-size: 24rpx;
						font-weight: bold;
						color: #333333;
					}

					.quan {
						font-size: 20rpx;
						color: #FE5E49;
						border-radius: 14rpx;
						border: 1px solid #FE5E49;
						padding: 0 14rpx 0 14rpx;
						margin-right: 19rpx;
					}

					.time {
						height: 36rpx;
						width: 100%;
						display: flex;
						align-items: center;

						.canUse {
							color: #666666;
							width: 100%;
							font-size: 20rpx;
						}

						.use {
							width: 30%;
							text-align: right;

							view {
								color: #fff;
								width: 120rpx;
								border-radius: 18rpx;
								height: 36rpx;
								display: flex;
								align-items: center;
								justify-content: center;
								font-size: 18rpx;
								background: #FE5E49;
							}
						}
					}
				}

				.bottom {
					display: flex;
					align-items: center;
					height: 40rpx;

					image {
						width: 12rpx;
						height: 8rpx;
					}

					view:first-child {
						color: #666666;
						font-size: 18rpx;
						padding-left: 26rpx;
						width: 50%;
					}

					view:last-child {
						padding-right: 26rpx;
						width: 50%;
						display: flex;
						align-items: center;
						flex-direction: row-reverse;
					}
				}
			}
		}
	}

	.draw-btn {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 416rpx;
		height: 66rpx;
		font-size: 28rpx;
		color: #fff;
		background: linear-gradient(135deg, #ff9c00, #ff7e00);
		border-radius: 33rpx;
		margin: auto;
		margin-top: 42rpx;

	}


	// 版本更新
	.newVersion {
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		z-index: 999;
		background-color: rgba(0, 0, 0, 0.5);

		.b-g {
			position: absolute;
			top: 322rpx;
			left: 100rpx;
			width: 550rpx;
			height: 732rpx;
			z-index: 999;
		}

		.msg {
			position: relative;
			z-index: 1000;
			font-size: 40rpx;
			font-weight: bold;
			color: white;
			margin-top: 393rpx;
			margin-left: 121rpx;
		}

		.num {
			position: relative;
			z-index: 1000;
			margin-top: 17rpx;
			font-size: 26rpx;
			font-weight: bold;
			color: white;
			margin-left: 121rpx;
		}

		scroll-view {
			position: relative;
			z-index: 1000;
			margin-top: 186rpx;
			height: 233rpx;
			width: 480rpx;
			margin-left: 130rpx;
			color: #333333;
			font-size: 26rpx;
		}

		.progress {
			position: relative;
			z-index: 1000;
			display: flex;
			align-items: center;
			justify-content: center;
			width: 440rpx;
			height: 80rpx;
			margin: 20rpx auto 0 auto;
		}

		.version-btn {
			position: relative;
			z-index: 1000;
			display: flex;
			align-items: center;
			justify-content: center;
			width: 440rpx;
			height: 80rpx;
			font-size: 30rpx;
			color: #fff;
			background: #FE5E49;
			box-shadow: 0px 5upx 10upx 0px rgba(224, 19, 41, 0.4);
			border-radius: 40rpx;
			margin-top: 20rpx;
		}
	}


	// 隐私协议
	.userAgreement {
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		z-index: 999;
		background-color: rgba(0, 0, 0, 0.5);
		display: flex;
		align-items: center;
		justify-content: center;

		.tips {
			position: relative;
			width: 600rpx;
			height: 787rpx;
			background: white;
			border-radius: 20rpx;

			.title {
				position: relative;
				height: 102rpx;
				width: 100%;
				border-bottom: 1rpx solid#eee;
				display: flex;
				align-items: center;
				justify-content: center;
				color: #333333;
				font-weight: bold;
				font-size: 32rpx;
			}

			.msg {
				position: relative;
				width: 482rpx;
				height: 375rpx;
				padding-top: 33rpx;
				color: #666666;
				font-size: 26rpx;
				margin-left: auto;
				margin-right: auto;
				border-bottom: 1rpx solid#eee;
			}

			.check {
				width: 482rpx;
				margin-left: auto;
				margin-right: auto;
				display: flex;
				font-size: 26rpx;
				color: #FE5E49;
				height: 78rpx;
				align-items: center;
				border-bottom: 1rpx solid#eee;

				.left {
					width: 50%;
				}

				.right {
					text-align: right;
					width: 50%;

					image {
						width: 9rpx;
						height: 16rpx;
						margin-left: 19rpx;
					}
				}
			}

			.btns {
				width: 482rpx;
				margin-left: auto;
				margin-right: auto;
				display: flex;
				justify-content: space-around;
				margin-top: 40rpx;

				.agree {
					position: relative;
					z-index: 1000;
					display: flex;
					align-items: center;
					justify-content: center;
					width: 210rpx;
					height: 70rpx;
					font-size: 30rpx;
					color: #fff;
					background: #FE5E49;
					border-radius: 35rpx;
				}

				.unagree {
					position: relative;
					z-index: 1000;
					display: flex;
					align-items: center;
					justify-content: center;
					width: 218rpx;
					height: 68rpx;
					font-size: 30rpx;
					color: #666666;
					background: white;

					&.borderOneRpx:after {
						border-radius: 68rpx;
						border-color: #ADADAD;
					}
				}
			}
		}

		.nopass {
			position: relative;
			width: 600rpx;
			height: 343rpx;
			background: white;
			border-radius: 16rpx;

			.msg {
				width: 477rpx;
				color: #333333;
				font-size: 30rpx;
				margin: 59rpx auto 0 auto;
			}

			.btns {
				width: 482rpx;
				margin-left: auto;
				margin-right: auto;
				display: flex;
				justify-content: space-around;
				margin-top: 40rpx;

				.agree {
					position: relative;
					z-index: 1000;
					display: flex;
					align-items: center;
					justify-content: center;
					width: 210rpx;
					height: 70rpx;
					font-size: 30rpx;
					color: #fff;
					background: #FE5E49;
					border-radius: 35rpx;
				}

				.unagree {
					position: relative;
					z-index: 1000;
					display: flex;
					align-items: center;
					justify-content: center;
					width: 218rpx;
					height: 68rpx;
					font-size: 30rpx;
					color: #666666;
					background: white;

					&.borderOneRpx:after {
						border-radius: 68rpx;
						border-color: #ADADAD;
					}
				}
			}
		}
	}


	//商品分类固定
	.stickyCategory {
		z-index: 99;
		position: sticky;
		padding-top: 0;
		margin-top: 26rpx;
		border-bottom: 1px solid #F5F5F5;
		border-radius: 10rpx 10rpx 0px 0px;
	}
</style>
